#include <iostream>
#include <string.h>
#include <linux/types.h>
#include <fcntl.h>
#include <unistd.h>


int main( int argc, char **argv){
    
   int fd = open("/dev/mychar",O_RDWR);
   if(fd<0){
       printf("open error\n");
       return -1;
   }
   char buf[100] = "hello world aaaaaaaaaaa aaaaaaaaaaaaaaa bbbbbbbbbbbbbbbb \r\n";
   int len = strlen(buf);
   int ret = write(fd,buf,len);
   if(ret<0){
       printf("write error\n");
       return -1;
   }

}